package com.bjsxt.array;

public class TestJavabean {
    public static void main(String[] args) {
        Emp emp0 = new Emp(1001,"gxy",19,"ujsd","2019");
        Emp emp1 = new Emp(1002,"gxy",13,"ujsd","2011");
        Emp emp2 = new Emp(1002,"gxy",14,"ujsd","2014");
        Emp[] emps = new Emp[3];
        emps[0]=emp0;
        emps[1]=emp1;
        emps[2]=emp2;

        for (int i=0; i<emps.length;i++){
            System.out.println(emps[i]);
        }
    }
}

class Emp{
    private int id;
    private String name;
    private int age;
    private String job;
    private String hiredate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getHiredate() {
        return hiredate;
    }

    public void setHiredate(String hiredate) {
        this.hiredate = hiredate;
    }
    public Emp(){}

    @Override
    public String toString() {
        return "Emp{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", job='" + job + '\'' +
                ", hiredate='" + hiredate + '\'' +
                '}';
    }

    public Emp(int id, String name, int age, String job, String hiredate) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.job = job;
        this.hiredate = hiredate;
    }

}